home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 46 lines | [TEXT/GEOL] |
- Item 2393382 19-May-89 12:08
-
- From: KNEPPER Knepper, Christopher
-
- To: FRIEDRICH1 Friedrich, Steve
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: DoChoice - enhancement request
-
- Hi Steve,
-
- My application in MacApp 2.0ßxxx makes extensive use of the DoChoice chain
- of control. Frequently, I want the actions of my DoChoice handler to be
- undoable. For example, I have a popup menu in a view and when a selection is
- made I use the popup menu's superview's DoChoice method to process the choice.
- However, the user may decide to "undo" his/her selection from the popup menu
- and right now it's hard to support this (ie override TControlTracker's
- TrackMouse method).
-
- So...I propose an enhancement request to TView.DoChoice: modify DoChoice to
- return a TCommand object, like DoMenuCommand.
-
- So,
-
- PROCEDURE TView.DoChoice(origView: TView; itsChoice: INTEGER);
-
- Would become:
-
- FUNCTION TView.DoChoice(origView: TView; itsChoice: INTEGER): TCommand;
-
- In this scheme, I would instantiate, initialize, and return a command
- object to perform the action associated with my choice, rather than handle the
- choice directly in a DoChoice handler.
-
- At a minimum, TControlTracker's TrackMouse method would need to be changed.
- It would need to process the TCommand object that would be returned to it by
- DoChoice in the trackRelease phase.
-
- -Chris
-
- PS: For those of you unfamiliar with the DoChoice chain, see Russ Wetmore's
- article "TView.DoChoice: A Quick Overview" in Frameworks (April '89).
-
-
-